#pragma once

#include "TianyaParse.h"
#include "afxwin.h"

void LoadConfig(BBS_PARAM *bbs);

// CBBSConfigDlg dialog

class CBBSConfigDlg : public CDialog
{
	DECLARE_DYNAMIC(CBBSConfigDlg)

public:
	CBBSConfigDlg(CWnd* pParent = NULL);   // standard constructor
	virtual ~CBBSConfigDlg();

// Dialog Data
	enum { IDD = IDD_CONFIG_DIALOG };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
public:
	CString m_szSaveDir;
	CButton m_ctlOnlyLZ;
	CButton m_ctlDownloadImage;
	CButton m_ctlOnlyText;
	CButton m_ctlNewDir;
	CButton m_ctlLocalStyle;
	afx_msg void OnBnClickedBtnSaveconfig();
	afx_msg void OnBnClickedOk();
	afx_msg void OnBnClickedBtnPath();

private:
	void WriteConfig();
	void ReadConfig();
	CString CheckBtnState(CButton *btn);
	void SetChekcBtnState(CButton *btn, bool state);
public:
	virtual BOOL OnInitDialog();
	int m_nMinText;
	CButton m_ctlSkipWithoutLZ;
	CButton m_ctlWordsFilter;
	afx_msg void OnBnClickedOnlylz();
	afx_msg void OnBnClickedCheck5();
	afx_msg void OnBnClickedCheck2();
};
